{% extends 'content/base.html' %}
{% load thumbnail %}
{% block content %}

    <div class="row">
        {% for g in goods %}
            <div class="col-md-3">
                {# 卡片 #}
                <div class="card" style="width: 18rem;">
                    {% thumbnail g.goods_image "160x160" crop="center" as im %}
                        <img src="{{ im.url }}" width="{{ im.width }}" height="{{ im.height }}">
                    {% endthumbnail %}
                    <div class="card-body">
                        <h6 class="card-title">{{ g.goods_name }}</h6>
                        <p class="card-text">
                            商品价格：{{ g.goods_price }}<br/>
                            优惠券：{{ g.coupon_value }}<br/>
                            销量：{{ g.goods_sales }}<br/>
                            收入比率：{{ g.income_ratio }}<br/>
                            佣金：{{ g.commission }}</p>
                        <a href="#" class="btn btn-primary">推广</a>
                    </div>
                </div>
            </div>

        {% endfor %}
    </div>
{% endblock content %}
